Like pattern operator

Basic and Crystal syntax.

The Like operator is useful for selecting records to include or exclude from your report.

Usage

x like y

{fieldname} like "c?n*"

This operator tests to see if the contents of {fieldname} matches a pattern that you specify in a character string "c?n*". If the contents of the field do fit the pattern "c?n*", then the formula returns the value True. If the field starts with anything else, the formula returns False.

Use the wildcard symbols ? and * to stand for variable characters. The ? stands for a single character. The * symbol stands for any number of characters.

Examples

The following examples are applicable to both Basic and Crystal syntax:

{customer.FIRST NAME} like "D?n"

TRUE, where {customer.FIRST NAME} = Dan or Don.

{customer.FIRST NAME} like "D?n"

FALSE, where {customer.FIRST NAME} = Doug or Rob.

{customer.LAST NAME} like "*s?n*"

TRUE, where {customer.LAST NAME} = Johnson or Olson or Olsen.

{customer.LAST NAME} like "*s?n*"

FALSE, where {customer.LAST NAME} = Johnston or Smith.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com